<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理员列表 - Powered By LIUSANY</title>
<meta name="Author" content="LIUSANY Team" />
<meta name="Copyright" content="LIUSANY" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link href="${ctx}/template/admin/css/base.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/template/admin/css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/template/common/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/template/common/js/jquery.pager.js"></script>
<script type="text/javascript" src="${ctx}/template/admin/js/base.js"></script>
<script type="text/javascript" src="${ctx}/template/admin/js/admin.js"></script>
</head>
<body class="list">
	<div class="bar">
		管理员列表&nbsp;总记录数: ${pager.totalItems} (共${pager.totalPages}页)
	</div>
	<div class="body">
		<form:form id="listForm" modelAttribute="page" action="${ctx}/admin/user/list" method="post">
		<div class="listBar">
           <input type="button" class="formButton" onclick="location.href='${ctx}/admin/user/create'" value="添加用户" hidefocus />
			&nbsp;&nbsp;
			<input type="text" name="filter_LIKES_loginName" value="${param['filter_LIKES_loginName']}"/>
				<input type="button" id="searchButton" class="formButton" value="搜 索" hidefocus />
				&nbsp;&nbsp;
			
				<label>每页显示: </label>
				<select name="pageSize" id="pageSize">
					<option value="10" <c:if test="${pager.pageSize == 10 }">selected</c:if> >
						10
					</option>
					<option value="20" <c:if test="${pager.pageSize == 20 }">selected</c:if> >
						20
					</option>
					<option value="50" <c:if test="${pager.pageSize == 50 }">selected</c:if> >
						50
					</option>
				</select>
		</div>
			<table id="listTable" class="listTable">
				<tr>
					<th class="check">
						<input type="checkbox" class="allCheck" />
					</th>
					<th>
						<a href="#" class="sort" name="loginName" hidefocus>用户名</a>
					</th>
					<th>
						<a href="#" class="sort" name="email" hidefocus>E-mail</a>
					</th>
					<th>
						<a href="#" class="sort" name="name" hidefocus>姓名</a>
					</th>
					<th>
						<a href="#" class="sort" name="department" hidefocus>所属部门</a>
					</th>
					<th>
						<a href="#" class="sort" name="loginDate" hidefocus>最后登录时间</a>
					</th>
					<th>
						<a href="#" class="sort" name="loginIp" hidefocus>最后登录IP</a>
					</th>
					<th>
						<span>状态</span>
					</th>
					<th>
						<a href="#" class="sort" name="createDate" hidefocus>创建日期</a>
					</th>
					<th>
						<span>操作</span>
					</th>
				</tr>
				
				<c:forEach items="${pager.result}" var="admin">
					<tr>
						<td>
							<input type="checkbox" name="ids" value="${admin.id}" />
						</td>
						<td>
							${admin.loginName}
						</td>
						<td>
							${admin.email}
						</td>
						<td>
							${admin.name}
						</td>
						<td>
							&nbsp;
						</td>
						<td>
								&nbsp;
						</td>
						<td>
						 &nbsp;
						</td>
						<td>
							正常
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							<a href="${ctx}/admin/user/update/${admin.id}" title="编辑">[编辑]</a>
						</td>
					</tr>
				</c:forEach>
				
			</table>
			<div class="pagerBar">
				<div class="delete">
					<input type="button" id="deleteButton" class="formButton" url="admin!delete.action" value="删 除" disabled hidefocus />
				</div>
				<div class="pager">
				<%@ include file="/WEB-INF/views/admin/pager.jsp"%>
			    </div>
	    </form:form>
	</div>
</body>
</html>